package com.yanyu.space.file.bean.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.yanyu.space.common.core.bean.db.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 文件分片 实体类
 *
 * @author yanyu
 * @date 2022-11-16
 */
@Data
@TableName("file_info_sharding")
@ApiModel(value = "FileInfoSharding对象}", description = "文件分片")
public class FileInfoSharding extends BaseEntity {

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "文件名")
    private Long fileInfoId;

    @ApiModelProperty(value = "uploadId分片上传id，minio生成")
    private String shardingUploadId;

    @ApiModelProperty(value = "总分片数")
    private Integer shardingCnt;

    @ApiModelProperty(value = "分片url")
    private String shardingUrl;

    @ApiModelProperty(value = "分片地址有效时间")
    private LocalDateTime shardingExpire;

    @ApiModelProperty(value = "文件状态；1：分片；2：合并成功；3：合并失败；4：自动关闭")
    private Integer shardingStatus;

}
